//
//  UIImageView+ZHMakeImgView.m
//  ZYT_IOS
//
//  Created by 正合适 on 2018/1/29.
//  Copyright © 2018年 正合适. All rights reserved.
//

#import "UIImageView+ZHMakeImgView.h"

@implementation UIImageView (ZHMakeImgView)
+ (instancetype)ZHMakeImgViewWithFrame:(CGRect)frame img:(UIImage *)img userEnable:(BOOL)enable bgColor:(UIColor *)bgColor {
    UIImageView *imgView = [[UIImageView alloc] initWithFrame:frame];
    imgView.userInteractionEnabled = enable;
    imgView.image = img;
    if (bgColor) imgView.backgroundColor = bgColor;
    return imgView;
}


+ (instancetype)ZHMakeImgViewWithFrame:(CGRect)frame img:(UIImage *)img userEnable:(BOOL)enable {
    return [UIImageView ZHMakeImgViewWithFrame:frame img:img userEnable:enable bgColor:nil];
}

@end
